const sharp = require('sharp')

async function verifyBorderColor(filePath) {
  const { dominant } = await sharp(filePath)
    .stats()
    .then(stats => ({ dominant: stats.dominant }))
  
  const expected = { r: 24, g: 144, b: 255 } // #1890ff
  return (
    Math.abs(dominant.r - expected.r) < 5 &&
    Math.abs(dominant.g - expected.g) < 5 &&
    Math.abs(dominant.b - expected.b) < 5
  )
}